Skip to content

Conversation

Rich-Harris
Copy link
Member

this does two things — it ensures that we don't insert double newlines...

image

...and ensures that we do add a newline if either the current node or the preceding node spans multiple lines. In other words we can convert this

/** @type {Foo[]} */
let foo = [];

/** @type {Bar[]} */
let bar = [];

to this

let foo: Foo[] = [];
let bar: Bar[] = [];

but if either the foo or bar declaration spans multiple lines, we want to have a newline between them after the conversion.

@Rich-Harris Rich-Harris merged commit d827a71 into main May 15, 2025
4 checks passed
@Rich-Harris Rich-Harris deleted the improve-jsdoc-conversion branch May 15, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant